// Copyright (C) 2024 Kumo inc.
// Author: Jeff.li lijippy@163.com
// All rights reserved.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published
// by the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <https://www.gnu.org/licenses/>.
//

#pragma once

// Feature macros for fine-tuning the performance of Taskflow at compile time
// 
// Disabled features by default:
// + MERAK_ENABLE_TASK_POOL       : enable task pool optimization
// + MERAK_ENABLE_ATOMIC_NOTIFIER : enable atomic notifier (required C++20)
//

#ifndef MERAK_DEFAULT_BOUNDED_TASK_QUEUE_LOG_SIZE
/**
@def MERAK_DEFAULT_BOUNDED_TASK_QUEUE_LOG_SIZE

This macro defines the default size of the bounded task queue in Log2. 
Bounded task queue is used by each worker.
*/
  #define MERAK_DEFAULT_BOUNDED_TASK_QUEUE_LOG_SIZE 8
#endif

#ifndef MERAK_DEFAULT_UNBOUNDED_TASK_QUEUE_LOG_SIZE
/**
@def MERAK_DEFAULT_UNBOUNDED_TASK_QUEUE_LOG_SIZE

This macro defines the default size of the unbounded task queue in Log2.
Unbounded task queue is used by the executor.
*/
  #define MERAK_DEFAULT_UNBOUNDED_TASK_QUEUE_LOG_SIZE 10
#endif


#include <merak/core/executor.h>
#include <merak/core/async.h>
#include <merak/version.h>
/**
@brief taskflow namespace
*/
namespace merak {

/**
@private
*/
namespace detail { }


/**
@brief queries the version information in a string format @c major.minor.patch

Release notes are available here: https://taskflow.github.io/taskflow/Releases.html
*/
constexpr const char* version() {
  return MERAK_VERSION_STRING;
}


}  // end of namespace merak
